#include "accountgetfriendrequest.h"

#include <QUrl>


namespace Account {

/**
 * @brief GetFriendRequest::GetFriendRequest
 * @param parent
 */
GetFriendRequest::GetFriendRequest(int userId, int page, QObject *parent)
    : FriendRequest(parent),
      m_userId(userId),
      m_page(page)
{
}

/**
 * @brief GetFriendRequest::url
 * @return
 */
QUrl GetFriendRequest::url() const
{
    QString url = QString("http://dev.mapi2.me.zing.vn/frs/mapi2/friend?method=friend.getlist&userId=%1&fields=userid,username,displayname,tinyurl&page=%2&records=%3&avatarSize=%4")
            .arg(m_userId).arg(m_page).arg(20).arg(120);
    return QUrl(url);
}

void GetFriendRequest::setPage(const int page)
{
    m_page = page;
}

} // namespace Account
